package com.kou.service.impl;

import com.kou.dao.AddressDao;
import com.kou.dao.AddressDaoImpl;
import com.kou.pojo.Address;
import com.kou.service.AddressService;

import java.util.List;

/**
 * @author SteinY
 * @create 2022-03-26 9:13
 * @description:
 */
public class AddressServiceImpl implements AddressService {
    AddressDao addressDao = new AddressDaoImpl();
    @Override
    public List<Address> findAll(String uid) {
        return addressDao.findAll(uid);
    }

    @Override
    public void add(String uid, String name, String phone, String detail) {
        addressDao.add(uid,name,phone,detail);
    }

    @Override
    public void delete(String id) {
        addressDao.delete(id);
    }

    @Override
    public void update(String id, String state, String name, String phone, String detail) {
        addressDao.update(id,state,name,phone,detail);
    }

    @Override
    public void setDefault(String id) {
        addressDao.setDefault(id);
    }
}
